package net.ru.topdog.lunchy.menu;

import java.math.BigDecimal;
import java.util.List;

import net.ru.topdog.lunchy.Dish;
import net.ru.topdog.lunchy.Main;
import net.ru.topdog.lunchy.main.MainModel;


public class MenuController implements MenuControllerInterface {

	
	MenuModelInterface model;
	MenuView view;
	
	public MenuController(MenuModelInterface model) {
		this.model=model;
		view = new MenuView(this,model);
		view.createMenuView();
		
	}

	@Override
	public void closeMenu() {
		Main.model.setActivity(true);
		
	}

	@Override
	public void addDish(String type,String name,String desc, String cost) {
		model.addDish(type, name, desc, cost);
		
	}



	@Override
	public void deleteDish(int id) {
		model.deleteDish(id);
		
	}

	@Override
	public void addType(String type) {
		model.addType(type);
				
	}

	@Override
	public void editDish(int id, String type,String name,String desc, String cost) {
		model.editDish(id, type, name, desc, cost);
		
	}

	@Override
	public void save() {
		model.save();
		
	}

	@Override
	public void load() {
		model.load();
		
	}

	@Override
	public void deleteType(int selectType) {
		model.deleteType(selectType);
		
	}
	
}
